<%@ Page Title="" Language="VB" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage(Of IEnumerable (Of CupsApp.Data.ClientSummary))" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	ShowClients
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>ShowClients</h2>

    <p>
        <%=Html.ActionLink("Create New", "Create")%>
    </p>
    
    <table>
        <tr>
            <th></th>
            <th>
                Last Name
            </th>
            <th>
                First Name
            </th>

            <th>
                Current Status
            </th>
            <th>
                Days Since Last Status Update
            </th>
            <th>
                Date Started
            </th>
        </tr>

    <% For Each item In Model%>
    
        <tr>
            <td>
                <%= Html.Encode(item.LastName) %>
            </td>
            <td>
                <%= Html.Encode(item.FirstName) %>
            </td>
            <td>
                <%=item.CurrentStatus%>
            </td>
            <td>
                <%=""%>
            </td>
            <td>
                <%=Html.Encode(String.Format("{0:d}", item.DateStarted))%>
            </td>
            <td>
                <%=Html.ActionLink("Edit", "Edit", New With {.id = item.ID})%> |
                <%=Html.ActionLink("Details", "Details", New With {.id = item.ID})%>
            </td>

        </tr>
    
    <% Next%>

    </table>

</asp:Content>

